dojo.provide("com.ibm.sherpa.Loader");

dojo.require("dijit.Dialog");

dojo.declare(
	"com.ibm.sherpa.Loader", dijit.Dialog,{
	
		templateString: "<div class='dijit_Dialog' style='z-index:1500' tabindex='0' waiRole='loading' waiState='labelledby-${id}_title'>" +
							"<div tabindex='0' dojoAttachPoint='containerNode' class='dijitDialogPaneContent'>" + 
							"<img src='${imgSrc}' alt='${imgInfo}' title='${imgInfo}' waiRole='${imgInfo}'/>" +
							"</div>" +
						"</div>",
		
		templatePath: null,

		duration: 400,
		
		imgSrc: 'images/indicator_medium.gif',
		
		imgInfo: 'Loading',

		postCreate: function(){
			this.inherited(arguments);
		},
		
		_onKey: function(/*Event*/ evt){
			if(evt.keyCode && evt.keyCode == dojo.keys.ESCAPE){
				dojo.stopEvent(evt);
				return;
			}else{
				this.inherited(arguments);
			}
		}
	}
);